﻿using System;
using FluentAssertions;
using INdTFramework.Commons.Converters;
using NUnit.Framework;

namespace INdTFramework.Tests
{
    public class ConvertersTests
    {
        [Test]
        public void convert_should_return_short_date_format() 
        {
            DateTimeConverter dtc = new DateTimeConverter();
            dtc.Pattern = "dd/MM/yyyy";
            String expected = "01/01/2011";
            String actual = (String) dtc.Convert(new DateTime(2011, 1, 1), null, null, null);

            actual.Should().Be(expected);
        }

        [Test]
        public void convert_output_cannot_be_null()
        {
            DateTimeConverter dtc = new DateTimeConverter();
            String actual = 
                (String)dtc.Convert(new DateTime(2011, 1, 1), null, null, null);
            actual.Should().NotBeNull();
        }

        [Test]
        public void test_to_fail()
        {
            String value = "x";
            value.Should().Be("b");
        }
    }
}
